home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_vim.idb / usr / freeware / share / vim / doc / intro.txt.z / intro.txt
Encoding:
Text File  |  1998-10-28  |  25.0 KB  |  591 lines

  1. *intro.txt*     For Vim version 5.0.  Last modification: 1998 Feb 16
  2.  
  3.  
  4.           VIM REFERENCE MANUAL    by Bram Moolenaar
  5.  
  6.  
  7. Introduction to Vim                    *ref* *reference*
  8.  
  9. 1. Introduction            |intro|
  10. 2. Vim on the internet        |internet|
  11. 3. Credits            |credits|
  12. 4. Notation            |notation|
  13. 5. Modes, introduction        |vim-modes-intro|
  14. 6. Switching from mode to mode    |mode-switching|
  15. 7. The window contents        |window-contents|
  16.  
  17. ==============================================================================
  18. 1. Introduction                        *intro*
  19.  
  20. Vim stands for Vi IMproved.  It used to be Vi IMitation, but there are so many
  21. improvements that a name change was appropriate.  Vim is a text editor which
  22. includes almost all the commands from the Unix program "Vi" and a lot of new
  23. ones.  It is very useful for editing programs and other 8-bit ASCII text.  All
  24. commands are given with the keyboard.  This has the advantage that you can
  25. keep your fingers on the keyboard and your eyes on the screen.  For those who
  26. want it, there is mouse support and a GUI version with scrollbars and menus
  27. (see |gui.txt|).
  28.  
  29. Throughout this manual the differences between Vi and Vim are mentioned in
  30. curly braces.  See |vi_diff.txt| for a summary of the differences.
  31.  
  32. This manual refers to Vim on various machines.  There may be small differences
  33. between different computers and terminals.  Besides the remarks given in this
  34. document, there is a separate document for each supported system, see
  35. |sys-file-list|.
  36.  
  37. This manual is a reference for all the Vim commands and options.  This is not
  38. an introduction to the use of Vim.  There are many books on Vi that contain a
  39. section for beginners.  I can recommend "Learning the Vi editor", by Linda
  40. Lamb, published by O'Reilly.  But, that book is for Vi, not for Vim.
  41.  
  42. A summary of this manual can be found in the file "help.txt",
  43. |help.txt|.  It can be accessed from within Vim with the <Help> or <F1>
  44. key and with the command ":help", |:help|.  The 'helpfile' option can be set
  45. to the name of the help file, so you can put it in any place you like.
  46.  
  47. ==============================================================================
  48. 2. Vim on the internet                    *internet*
  49.  
  50.             *www* *faq* *FAQ* *ftp* *distribution* *download*
  51. The Vim pages contain the most recent information about Vim.  They also
  52. contain links to the most recent version of Vim.  The FAQ is a list of
  53. Frequently Asked Questions.  Read this if you have problems.
  54.  
  55.     VIM home page:    <URL:http://www.vim.org/>
  56.     VIM FAQ:    <URL:http://www.vim.org/faq/>
  57.  
  58.  
  59. Usenet News group where Vim is discussed:        *news* *usenet*
  60.     comp.editors
  61. See <URL:http://www.vim.org/news.html>.
  62.  
  63.                             *vimdev* *mail-list*
  64. There are three mailing lists for Vim:
  65. <vim@vim.org>
  66.     For discussions about using existing versions of Vim: Useful mappings,
  67.     questions, answers, where to get a specific version, etc.
  68. <vim-dev@vim.org>
  69.     For discussions about changing Vim: New features, porting, beta-test
  70.     versions, etc.
  71. <vim-announce@vim.org>
  72.     Announcements about new versions of Vim; also beta-test versions and
  73.     ports to different systems.
  74.  
  75. See <URL:http://www.vim.org/mail.html>.
  76.  
  77. NOTE:
  78. - You can only send messages to these lists if you have subscribed!
  79. - You need to send the messages from the same location as where you subscribed
  80.   from (to avoid spam mails).
  81. - Maximum message size is 40000 characters.
  82.  
  83. If you want to join, send a message to
  84.     <vim-help@vim.org>
  85. Make sure that your "From:" address is correct.  Then the list server will
  86. give you help on how to subscribe.
  87.  
  88. An archive is kept at:
  89. <URL:ftp://ftp.ii.uib.no/pub/vim/mail-archive/vim/maillist.html>
  90. <URL:ftp://ftp.ii.uib.no/pub/vim/mail-archive/vimdev/maillist.html>
  91. <URL:ftp://ftp.ii.uib.no/pub/vim/mail-archive/vimannounce/maillist.html>
  92. [Note: it doesn't work anymore]
  93.  
  94. This was announced, but I don't think it works:
  95. <URL:http://www.findmail.com/listsaver/vimannounce.html>
  96.  
  97.  
  98. Bug reports:                *bugs* *bug-reports* *bugreport.vim*
  99.     Bram Moolenaar <Bram@vim.org>
  100. Please be brief; all the time that is spend on answering mail is subtracted
  101. from the time that is spent on improving Vim!  Always give a reproduceable
  102. example and try to find out which settings or other things influence the
  103. appearance of the bug.  Try different machines, if possible.  Send me patches
  104. if you can!
  105.  
  106. In case of doubt, use:
  107. >  :so $VIM/bugreport.vim
  108. This will create a file "bugreport.txt" in the current directory, with a lot
  109. of information of your environment.  Before sending this out, check if it
  110. doesn't contain any confidential information!
  111.  
  112. When Vim crashes in one of the test files, and you are using gcc for
  113. compilation, here is what you can do to find out exactly where Vim crashes:
  114.  
  115. 1. Compile Vim with the "-g" option (there is a line in the Makefile for this,
  116.    which you can uncomment).
  117.  
  118. 2. Execute these commands (replace "11" with the test that fails):
  119. >    cd testdir
  120. >    gdb ../vim
  121. >    run -u NONE -s dotest.in test11.in
  122.  
  123. 3. Check where Vim crashes, gdb should give a message for this.
  124.  
  125. 4. Get a stack trace from gdb with this command:
  126. >    where
  127.  
  128.                             *year-2000*
  129. Since Vim internally doesn't use dates, there is no year 2000 problem.
  130. There might be a year 2038 problem, when the seconds since January 1st 1970
  131. don't fit in a 32 bit int anymore.  This depends on the compiler, libraries
  132. and operating system.  Specifically, time_t and the ctime() function are used.
  133. And the time_t is stored in four bytes in the swap file.  But that's only used
  134. for printing a file date/time for recovery.
  135.  
  136. ==============================================================================
  137. 3. Credits                        *credits* *author*
  138.  
  139. Most of Vim was written by Bram Moolenaar <Bram@vim.org>.
  140.  
  141. Parts of the documentation come from several Vi manuals, written by:
  142.     W.N. Joy
  143.     Alan P.W. Hewett
  144.     Mark Horton
  145.  
  146. The Vim editor is based on Stevie and includes (ideas from) other software,
  147. worked on by the people mentioned here.  Other people helped by sending me
  148. patches, suggestions and giving feedback about what is good and bad in Vim.
  149.  
  150. Vim would never have become what it is now, without the help of these people!
  151.  
  152.     Ron Aaron        Win32 GUI changes
  153.     Dany St-Amant        Macintosh port
  154.     Tony Andrews        Stevie
  155.     Gert van Antwerpen    changes for DJGPP on MS-DOS
  156.     Berkeley DB(3)        ideas for swap file implementation
  157.     Keith Bostic        Nvi
  158.     Ralf Brown        SPAWNO library for MS-DOS
  159.     Robert Colon        many useful remarks
  160.     Kayhan Demirel        sent me news in Uganda
  161.     Chris & John Downey    xvi (ideas for multi-windows version)
  162.     Eric Fischer        Mac port, 'cindent', and other improvements
  163.     Bill Foster        Athena GUI port
  164.     Loic Grenie        xvim (ideas for multi windows version)
  165.     Sven Guckes        Vim WWW page maintainer
  166.     Darren Hiebert        Exhuberant ctags
  167.     Steve Kirkendall    Elvis
  168.     Sergey Laskavy        Vim's help from Moscow
  169.     Felix von Leitner    Maintainer of Vim Mailing Lists
  170.     David Leonard        Port of Python extensions to Unix
  171.     Avner Lottem        Edit in right-to-left windows
  172.     Paul Moore        Python interface extensions
  173.     George V. Reilly    Win32 port, Win32 GUI start-off
  174.     Stephen Riehm        bug collector
  175.     Olaf Seibert        DICE and BeBox version, regexp improvements
  176.     Mortaza Shiran        Farsi patches
  177.     Peter da Silva        termlib
  178.     Paul Slootman        OS/2 port
  179.     Henry Spencer        regular expressions
  180.     Tim Thompson        Stevie
  181.     G. R. (Fred) Walter    Stevie
  182.     Sven Verdoolaege    Perl interface
  183.     Robert Webb        Command-line completion, GUI versions, and
  184.                 lots of patches
  185.     Juergen Weigert        Lattice version, AUX improvements, UNIX and
  186.                 MS-DOS ports, autoconf
  187.     Stefan 'Sec' Zehl    Maintainer of vim.org
  188.  
  189. I wish to thank all the people that sent me bug reports and suggestions.  The
  190. list is too long to mention them all here.  Vim would not be the same without
  191. the ideas from all these people: They keep Vim alive!
  192.  
  193. ==============================================================================
  194. 4. Notation                        *notation*
  195.  
  196. []        Characters in square brackets are optional.
  197.  
  198.                             *count* *[count]*
  199. [count]        An optional number that may precede the command to multiply
  200.         or iterate the command.  If no number is given, a count of one
  201.         is used, unless otherwise noted.  Note that in this manual the
  202.         [count] is not mentioned in the description of the command,
  203.         but only in the explanation.  This was done to make the
  204.         commands easier to look up.  If the 'showcmd' option is on,
  205.         the (partially) entered count is shown at the bottom of the
  206.         window.  You can use <Del> to erase the last digit (|N<Del>|).
  207.  
  208.                             *[quotex]*
  209. ["x]        An optional register designation where text can be stored.
  210.         See |registers|.  The x is a single character between 'a' and
  211.         'z' or 'A' and 'Z' or '"', and in some cases (with the put
  212.         command) between '0' and '9', '%', '#', ':' or '.'. The
  213.         uppercase and lower case letter designate the same register,
  214.         but the lower case letter is used to overwrite the previous
  215.         register contents, while the uppercase letter is used to
  216.         append to the previous register contents. Without the ""x" or
  217.         with """" the stored text is put into the unnamed register.
  218.  
  219.                             *{}*
  220. {}        Curly braces denote parts of the command which must appear,
  221.         but which can take a number of different values.  The
  222.         differences between Vim and Vi are also given in curly braces
  223.         (this will be clear from the context).
  224.  
  225.                             *{motion}*
  226. {motion}    A command that moves the cursor.  See the list at
  227.         |motion.txt|.  This is used after an operator command
  228.         |operator| to move over the text that is to be operated upon.
  229.         If the motion includes a count and the operator also had a
  230.         count, the two counts are multiplied.  For example: "2d3w"
  231.         deletes six words.  The motion can also be a mouse click.  The
  232.         mouse is currently only supported for MS-DOS, Win32 and xterm
  233.         under Unix.  The ":omap" command can be used to map characters
  234.         while an operator is pending.
  235.  
  236.                             *{Visual}*
  237. {Visual}    A piece of text that is started with the "v", "V", or CTRL-V
  238.         command and ended by the cursor position.  This is used
  239.         before an operator command |operator| to highlight the text
  240.         that is to be operated upon.  See |Visual-mode|.
  241.  
  242.                             *<character>*
  243. <character>    A special character from the table below or a single ASCII
  244.         character.
  245.  
  246.                             *'character'*
  247. 'character'    A single ASCII character.
  248.  
  249.                             *<char1-char2>*
  250. <char1-char2>    A single character from the range <char1> to <char2>.  For
  251.         example: <a-z> is a lowercase letter.  Multiple ranges may be
  252.         concatenated.  For example, <a-zA-Z0-9> is any alphanumeric
  253.         character.
  254.  
  255.                             *CTRL-{char}*
  256. CTRL-{char}    {char} typed as a control character; that is, typing {char}
  257.         while holding the CTRL key down.  The case of {char} does not
  258.         matter; thus CTRL-A and CTRL-a are equivalent.  But on some
  259.         terminals, using the SHIFT key will produce another code,
  260.         don't use it then.
  261.  
  262.                             *'option'*
  263. 'option'    An option, or parameter, that can be set to a value, is
  264.         enclosed in single quotes.  See |options|.
  265.  
  266.                             *quotecommandquote*
  267. "command"    In examples, the commands you can type are enclosed in double
  268.         quotes.
  269.  
  270.                         *key-notation* *key-codes*
  271. These names for keys are used in the documentation.  They can also be used
  272. with the ":map" command.
  273.  
  274. notation    meaning            equivalent    decimal value(s)    ~
  275. -----------------------------------------------------------------------
  276. <Nul>        zero            CTRL-@      0 (stored as 10) *<Nul>*
  277. <BS>        backspace        CTRL-H      8    *backspace*
  278. <Tab>        tab            CTRL-I      9    *tab*
  279.                             *linefeed*
  280. <NL>        linefeed        CTRL-J     10 (used for <Nul>)
  281. <FF>        formfeed        CTRL-L     12    *formfeed*
  282. <CR>        carriage return        CTRL-M     13    *carriage-return*
  283. <Enter>        same as <CR>                *<Enter>*
  284. <Esc>        escape            CTRL-[     27    *escape* *<Esc>*
  285. <Space>        space                 32    *space*
  286. <Del>        delete                127
  287. <Bar>        vertical bar        |    124    *<Bar>*
  288. <Bslash>    backslash        \     92    *backslash* *<Bslash>*
  289.  
  290. <EOL>        end-of-line (can be <CR>, <LF> or <CR><LF>,
  291.         depends on system and 'fileformat')      *<EOL>*
  292.  
  293. <Up>        cursor-up            *cursor-up* *cursor_up*
  294. <Down>        cursor-down            *cursor-down* *cursor_down*
  295. <Left>        cursor-left            *cursor-left* *cursor_left*
  296. <Right>        cursor-right            *cursor-right* *cursor_right*
  297. <S-Up>        shift-cursor-up
  298. <S-Down>    shift-cursor-down
  299. <S-Left>    shift-cursor-left
  300. <S-Right>    shift-cursor-right
  301. <C-Left>    control-cursor-left
  302. <C-Right>    control-cursor-right
  303. <F1> - <F12>    function keys 1 to 12        *function_key* *function-key*
  304. <S-F1> - <S-F12> shift-function keys 1 to 12    *<S-F1>*
  305. <Help>        help key
  306. <Undo>        undo key
  307. <Insert>    insert key
  308. <Home>        home                *home*
  309. <End>        end                *end*
  310. <PageUp>    page-up                *page_up* *page-up*
  311. <PageDown>    page-down            *page_down* *page-down*
  312. <kHome>        keypad home (upper left)    *keypad-home*
  313. <kEnd>        keypad end (lower left)        *keypad-end*
  314. <kPageUp>    keypad page-up (upper right)    *keypad-page-up*
  315. <kPageDown>    keypad page-down (lower right)    *keypad-page-down*
  316. <S-...>        shift-key            *shift*
  317. <C-...>        control-key            *control* *ctrl*
  318. <M-...>        alt-key or meta-key        *meta* *alt*
  319. <t_xx>        key with "xx" entry in termcap
  320. -----------------------------------------------------------------------
  321.  
  322. Note: The shifted cursor keys, the help key, and the undo key are only
  323. available on a few terminals.  On the Amiga, shifted function key 10 produces
  324. a code (CSI) that is also used by key sequences.  It will be recognized only
  325. after typing another key.
  326.  
  327. Note: There are two codes for the delete key.  127 is the decimal ASCII value
  328. for the delete key, which is always recognized.  Some delete keys send another
  329. value, in which case this value is obtained from the termcap entry "kD".  Both
  330. values have the same effect.  Also see |:fixdel|.
  331.  
  332. Note: The keypad keys are used in the same way as the corresponding "normal"
  333. keys.  For example, <kHome> has the same effect as <Home>.  If a keypad key
  334. sends the same raw key code as it non-keypad equivalent, it will be recognized
  335. as the non-keypad code.  For example, when <kHome> sends the same code as
  336. <Home>, when pressing <kHome> Vim will think <Home> was pressed.  Mapping
  337. <kHome> will not work then.
  338.  
  339.                                 *<>*
  340. Examples are often given in the <> notation.  Sometimes this is just to make
  341. clear what you need to type, but often it can be typed literally, e.g., with
  342. the ":map" command.  The rules are:
  343.  1.  Any printable characters are typed directly, except backslash and '<'
  344.  2.  A backslash is represented with "\\", double backslash.
  345.  3.  A real '<' is represented with "\<".
  346.  4.  "<key>" means the special key typed.  This is the notation explained in
  347.      the table above.  A few examples:
  348.        <Esc>        Escape key
  349.        <C-G>        CTRL-G
  350.        <Up>            cursor up key
  351.        <C-LeftMouse>    Control- left mouse click
  352.        <S-F11>        Shifted function key 11
  353.        <M-a>        Meta- a  ('a' with bit 8 set)
  354.        <M-A>        Meta- A  ('A' with bit 8 set)
  355.        <t_kd>        "kd" termcap entry (cursor down key)
  356.  
  357. If you want to use the full <> notation in Vim, you have to remove the 'B'
  358. flag from 'cpoptions' and make sure the '<' flag is excluded (it already is by
  359. default).
  360.     :set cpo=ceFs
  361. If you have the 'B' flag in 'cpoptions', then <> notation mostly still works,
  362. but you can't escape the special meaning of key names in <> with a backslash.
  363. To distinguish using <> with and without the 'B' flag, it's called full <>
  364. notation if the 'B' flag is excluded.
  365. For mapping, abbreviation and menu commands you can then copy-paste the
  366. examples and use them directly.  Or type them literally, including the '<' and
  367. '>' characters.  This does NOT work for other commands, like ":set" and
  368. ":autocmd"!
  369.  
  370.  
  371. There are several references to other versions of Vi:
  372.                                 *Vi*
  373.     Vi    "the original".  Without further remarks this is the version
  374.         of Vi that appeared in Sun OS 4.x.  ":version" returns
  375.         "Version 3.7, 6/7/85".  Sometimes other versions are referred
  376.         to.  Only runs under Unix.  Source code only available with a
  377.         license.  More information on Vi can be found through:
  378.             <URL:http://www.vim.org>
  379.  
  380.                                 *Posix*
  381.     Posix    From the IEEE standard 1003.2, Part 2: Shell and utilities.
  382.         Generally known as "Posix".  This is a textual description of
  383.         how Vi is supposed to work.  The version used is a draft from
  384.         beginning 1996, so all remarks are "expected to comply to"
  385.         this.  Anything can change though...
  386.                                 *Nvi*
  387.     Nvi    The "New" Vi.  The version of Vi that comes with BSD 4.4 and
  388.         many free Unix versions.  The version used is 1.79.
  389.         ":version" returns "Version 1.79 (10/23/96)".  Source code is
  390.         freely available.
  391.                                 *Elvis*
  392.     Elvis    Another Vi clone, made by Steve Kirkendall.  The version used
  393.         is 2.1b, which is a beta-test version.  Version 2.0 is the
  394.         last official release.  Source code is freely available.
  395.  
  396. ==============================================================================
  397. 5. Modes, introduction                *vim-modes-intro* *vim-modes*
  398.  
  399. Vim has five BASIC modes:
  400.  
  401. Normal mode        In Normal mode you can enter all the editor
  402.             commands.  If you start the editor you are in this
  403.             mode (unless you have set the 'insertmode' option,
  404.             see below).  This is also known as command mode.
  405.  
  406. Visual mode        This is like Normal mode, but the movement commands
  407.             extend a highlighted area.  When a non-movement
  408.             command is used, it is executed for the highlighted
  409.             area.  See |Visual-mode|.
  410.  
  411. Insert mode        In Insert mode the text you type is inserted into the
  412.             buffer.  If the 'showmode' option is on (which is
  413.             default), the string "-- INSERT --" is shown at the
  414.             bottom of the window.  |mode-ins-repl|
  415.  
  416. Command-line mode    In Command-line mode you can enter one line of text
  417.             at the bottom of the window.  This is for the Ex
  418.             commands, ":", the pattern search commands, "?" and
  419.             "/", and the filter command, "!".  |mode-cmdline|
  420.  
  421. Ex mode            Like Command-line mode, but after entering a command
  422.             you remain in Ex mode.  Very limited editing of the
  423.             command.  |mode-Ex|
  424.  
  425. There are two ADDITIONAL modes:
  426.  
  427. Replace mode        Replace mode is a special case of Insert mode.  You
  428.             can do the same things as in Insert mode, but for
  429.             each character you enter, one character of the existing
  430.             text is deleted.  If the 'showmode' option is on,
  431.             (which is the default), the string "-- REPLACE --" is
  432.             shown at the bottom of the window.  |replace-mode|
  433.  
  434. Insert command mode    Entered when CTRL-O given in Insert mode.  This is
  435.             like Normal mode, but after executing one command Vim
  436.             returns to Insert mode.  The string "-- (insert) --"
  437.             is shown at the bottom of the window.
  438.  
  439.  
  440. ==============================================================================
  441. 6. Switching from mode to mode                *mode-switching*
  442.  
  443. If for any reason you do not know which mode you are in, you can always get
  444. back to Normal mode by typing <Esc> twice.  You will know you are back in
  445. Normal mode when you see the screen flash or hear the bell after you type
  446. <Esc>.  This doesn't work for Ex mode, use ":visual".
  447.  
  448.                             *i_esc*
  449.               TO mode                          ~
  450.                 Normal     Visual     Insert     Replace    Cmd-line   Ex ~
  451. FROM mode                                  ~
  452. Normal          -        v V ^V      *1          R        : / ? !    Q
  453. Visual           *2          -         c C         --       :          --
  454. Insert           <Esc>       --        -         <Insert>   --         --
  455. Replace          <Esc>       --       <Insert>     -        --         --
  456. Command-line     *3          --       --           --       -          --
  457. Ex               :vi         --       --           --       --         -
  458.  
  459. -  NA
  460. -- not possible
  461.  
  462. *1 Go from Normal mode to Insert mode by giving the command "i", "I", "a",
  463.    "A", "o", "O", "c", "C", "s" or S".
  464. *2 Go from Visual mode to Normal mode by giving a non-movement command, which
  465.    causes the command to be executed, or by hitting <Esc> "v", "V" or "CTRL-V"
  466.    (see |v_v|), which just stops Visual mode without side effets.
  467. *3 Go from Command-line mode to Normal mode by:
  468.    - Hitting <CR> or <NL>, which causes the entered command to be executed.
  469.    - Deleting the complete line (e.g., with CTRL-U) and giving a final <BS>.
  470.    - Hitting CTRL-C or <Esc>, which quits the command line without executing
  471.      the command.
  472.    In the last case <Esc> may be the character defined with the 'wildchar'
  473.    option, in which case it will start command line completion.  You can
  474.    ignore that and type <Esc> again.  {Vi: when hitting <Esc> the command line
  475.    is executed.  This is unexpected for most people; therefore it was changed
  476.    in Vim.  But when the <Esc> is part of a mapping, the command line is
  477.    executed.  If you want the Vi behaviour also when typing <Esc>, use ":cmap
  478.    ^V<Esc> ^V^M"}
  479.  
  480. If the 'insertmode' option is on, editing a file will start in Insert mode.
  481.  
  482.                         *Q* *mode-Ex* *ex-mode*
  483. Q            Switch to "Ex" mode.  This is a bit like typing ":"
  484.             commands one after another, except:
  485.             - You don't have to keep pressing ":".
  486.             - The screen doesn't get updated after each command.
  487.             - There is no normal command-line editing.
  488.             - Mappings and abbreviations are not used.
  489.             In fact, you are editing the lines with the "standard"
  490.             line-input editing commands (<Del> or <BS> to erease,
  491.             CTRL-U to kill the whole line).
  492.             Vim will enter this mode by default if it's invoked as
  493.             "ex" on the command line.
  494.             Use the ":vi" command |:visual| to exit "Ex" mode.
  495.  
  496. ==============================================================================
  497. 7. The window contents                    *window-contents*
  498.  
  499. In command and Insert/Replace mode the screen window will show the current
  500. contents of the buffer: What You See Is What You Get.  There are two
  501. exceptions:
  502. - When the 'cpoptions' option contains '$', and the change is within one line,
  503.   the text is not directly deleted, but a '$' is put at the last deleted
  504.   character.
  505. - When inserting text in one window, other windows on the same text are not
  506.   updated until the insert is finished.
  507. {Vi: The screen is not always updated on slow terminals}
  508.  
  509. Lines longer than the window width will wrap, unless the 'wrap' option is off
  510. (see below).  The 'linebreak' option can be set to wrap at a blank character.
  511.  
  512. The bottom lines in the window may start with one of these two characters:
  513.  
  514. '@'    The next line is too long to fit in the window.
  515. '~'    Below the last line in the buffer.
  516.  
  517. If the bottom line is completely filled with '@', the line that is at the
  518. top of the window is too long to fit in the window.  If the cursor is on this
  519. line you can't see what you are doing, because this part of the line is not
  520. shown.  However, the part of the line before the '@'s can be edited normally.
  521. {Vi: gives an "internal error" on lines that do not fit in the window}
  522.  
  523. The '@' occasion in the 'highlight' option can be used to set special
  524. highlighting for the '@' and '~' characters.
  525.  
  526. The 'showbreak' option contains the string to put in front of wrapped lines.
  527.  
  528.                             *wrap-off*
  529. If the 'wrap' option is off, long lines will not wrap.  Only the part that
  530. fits on the screen is shown.  If the cursor is moved to a part of the line
  531. that is not shown, the screen is scrolled horizontally.  The advantage of
  532. this method is that columns are shown as they are and lines that cannot fit
  533. on the screen can be edited.  The disadvantage is that you cannot see all the
  534. characters of a line at once.  The 'sidescroll' option can be set to the
  535. minimal number of columns to scroll.  {Vi: has no 'wrap' option}
  536.  
  537. All normal ASCII characters are displayed directly on the screen.  The <Tab>
  538. is replaced with the number of spaces that it represents.  Other non-printing
  539. characters are replaced with "^{char}", where {char} is the non-printing
  540. character with 64 added.  Thus character 7 (bell) will be shown as "^G".
  541. Characters between 127 and 160 are replaced with "~{char}", where {char} is
  542. the character with 64 subtracted.  These characters occupy more than one
  543. position on the screen.  The cursor can only be positioned on the first one.
  544.  
  545. If you set the 'number' option, all lines will be preceded with their
  546. number.  Tip: If you don't like wrapping lines to mix with the line numbers,
  547. set the 'showbreak' option to eight spaces:
  548.     ":set showbreak=\ \ \ \ \ \ \ \ "
  549.  
  550. If you set the 'list' option, <Tab> characters will not be shown as several
  551. spaces, but as "^I".  A '$' will be placed at the end of the line, so you can
  552. find trailing blanks.
  553.  
  554. In Command-line mode only the command line itself is shown correctly.  The
  555. display of the buffer contents is updated as soon as you go back to Command
  556. mode.
  557.  
  558. The last line of the window is used for status and other messages.  The
  559. status messages will only be used if an option is on:
  560.  
  561. status message            option         default    Unix default    ~
  562. current mode            'showmode'    on        on
  563. command characters        'showcmd'    on        off
  564. cursor position            'ruler'        off        off
  565.  
  566. The current mode is "-- INSERT --" or "-- REPLACE --", see |'showmode'|.  The
  567. command characters are those that you typed but were not used yet.  {Vi: does
  568. not show the characters you typed or the cursor position}
  569.  
  570. If you have a slow terminal you can switch off the status messages to speed
  571. up editing:
  572.     :set nosc noru nosm
  573.  
  574. If there is an error, an error message will be shown for at least one second
  575. (in reverse video).  {Vi: error messages may be overwritten with other
  576. messages before you have a chance to read them}
  577.  
  578. Some commands show how many lines were affected.  Above which threshold this
  579. happens can be controlled with the 'report' option (default 2).
  580.  
  581. On the Amiga Vim will run in a CLI window.  The name Vim and the full name of
  582. the current file name will be shown in the title bar.  When the window is
  583. resized, Vim will automatically redraw the window.  You may make the window as
  584. small as you like, but if it gets too small not a single line will fit in it.
  585. Make it at least 40 characters wide to be able to read most messages on the
  586. last line.
  587.  
  588. On most Unix systems window resize works ok.  {Vi: not ok}
  589.  
  590.  vim:ts=8:sw=8:tw=78:
  591.